package day4;

public class Test4 {
    public static void main(String[] args) {
        int[] nums = {20, 10, 3, 50};
        int min = nums[0];
        int max = nums[0];
        for (int i = 1; i < nums.length; i++) {
            if(nums[i] < min) min = nums[i];
            if(nums[i] > max) max = nums[i];
        }
        System.out.println(min);
        System.out.println(max);

    }
}
